﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace linkouqs.Gamekit {

    public class CharacterStateJumpAttack : CharacterState {

        CharacterAbilityJumpAttack m_JumpAttack;

        public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
            base.OnStateEnter(animator, stateInfo, layerIndex);
            m_JumpAttack = animator.GetComponent<CharacterAbilityJumpAttack>();
            Character.LockMovement = true;
        }

        public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
            Character.LockMovement = false;
            m_JumpAttack.StopAction();
            m_JumpAttack = null;
            base.OnStateExit(animator, stateInfo, layerIndex);
        }

    }

}